//
//  RankModel.m
//  WuLi
//
//  Created by Gollum on 16/09/02
//  Copyright (c) Gollum. All rights reserved.
//

#import "RankModel.h"
#import "RankData.h"

@implementation RankModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [RankData class]};
}
- (void)setValue:(id)value forKey:(NSString *)key{
    //记得super
    [super setValue:value forKey:key];
    NSMutableArray <RankData *>*rankData = [NSMutableArray array];
    NSArray *valueArray = value;
    if ([key isEqualToString:@"data"]) {
        for (NSDictionary *dic in valueArray) {
            RankData *myData = [RankData modelWithDic:dic];
            [rankData addObject:myData];
        }
        _data = rankData;
    }
}
@end
